/*
 * Tile.cpp
 *
 *  Created on: 05-02-2012
 *      Author: glu
 */

#include "Tile.h"

Tile::Tile() {
	in_range = false;
	x = y = 0;
}
Tile::Tile(int x, int y) {
	this->x = x;
	this->y = y;
	in_range = false;
}
bool Tile::getInRange(){
	return in_range;
}
void Tile::setInRange(bool new_value){
	in_range = new_value;
}
bool Tile::getActive(){
	return active;
}
void Tile::setActive(bool new_value){
	active = new_value;
}

bool Tile::containMouse(int x_mouse, int y_mouse){
	if( x_mouse > x && x_mouse <= x + TILE_WIDTH && y_mouse > y && y_mouse <= y + TILE_HEIGHT)
		return true;
	else return false;
}
SDL_Rect Tile::getBounds(){
	SDL_Rect bound;
	bound.x = x;
	bound.y = y;
	return bound;
}

void Tile::setGroundType(GroundType t){
	groundType = t;
}

GroundType Tile::getGroundType(){
	return groundType;
}
